#!/bin/bash


PID=$(ps -ef | grep study-eureka-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
    echo  study-eureka Application is already stopped
else
    echo kill $PID
    kill $PID
fi

PID=$(ps -ef | grep study-getaway-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
    echo  study-getaway Application is already stopped
else
    echo kill $PID
    kill $PID
fi

PID=$(ps -ef | grep study-user-service-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
    echo  study-user-service Application is already stopped
else
    echo kill $PID
    kill $PID
fi


PID=$(ps -ef | grep study-account-service-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
    echo  study-account-service Application is already stopped
else
    echo kill $PID
    kill $PID
fi
